package com.zwj.mapper;



import com.zwj.bo.QueryHomework;
import com.zwj.vo.RestEnclosure;
import com.zwj.vo.SelectWorkInfoVo;
import com.zwj.vo.SelectWorkSubmitInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface TeacherOperationMapper {
   List<SelectWorkSubmitInfoVo> QueryHomework(QueryHomework queryHomework, String teacherName, String type, String types);
   @Select("SELECT create_time,title,complete_date,appends_link,teacher_name FROM `wrok_job_view`  WHERE id=#{id}")
   SelectWorkInfoVo PersonalTask(@Param("id")Integer id);
   @Select("SELECT file_url,file_name FROM attachement WHERE origin_type=#{type} AND origin_id=#{workId}")
   List<RestEnclosure>  Enclosure(@Param("workId") Long workId, @Param("type") String type);

   @Update("UPDATE work_submit_info set score=#{score}, teacher_remark=#{teacher_remark}  WHERE id=#{id}")
   boolean ApprovalWork(@Param("id")Integer id,@Param("score") float score, @Param("teacher_remark")String teacher_remark);

}
